pub fn str_to_italic(s: &str) -> String {
    s.chars().map(|c| char_to_italic(c)).collect()
}

fn char_to_italic(c: char) -> char {
    if c.is_ascii_lowercase() {
        if c == 'h' {
            'ℎ'
        } else {
            char::from_u32((c as u32) + 0x1d44e - 0x61).unwrap()
        }
    } else if c.is_ascii_uppercase() {
        char::from_u32((c as u32) + 0x1d434 - 0x41).unwrap()
    } else {
        c
    }
}

pub fn char_to_italic_str(c: char) -> String {
    char_to_italic(c).to_string()
}

pub fn is_op(c: char) -> bool {
    c == '+' || c == '-' || c == '=' || c == '/'
}

pub fn is_letter(c: char) -> bool {
    c.is_ascii_alphabetic()
}

pub fn char_to_num(c: char) -> usize {
    c as u32 as usize - 48
}